<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
  </head>
  <body>
    <script>
      function star(row, col) {
        for (var i = 0; i < row; i++) {
          for (var j = 0; j < col; j++) {
            document.write("*");
          }
          document.write("<br>");
        }
      }
      var starrow = prompt("请输入行：") * 1;
      var starcol = prompt("请输入列：") * 1;
      star(starrow, starcol);
    </script>
  </body>
</html>
